import request from '@/utils/request'
let serviceName="/goods-service"

/**
 * 获取分页数据
 * @param { } keyword 
 */
export function getBrands(keyword) {
    return request({ url: serviceName+ "/brand/list", method: "post", data: keyword });
}
/**
 * 更新
 * @param {*} id 
 */
export function update(Brand){
    return  request({ url: serviceName+"/brand/update", method: "post",data: Brand});
}
/**
 * 删除
 * @param {*} id 
 */
export function remove(id){
    return  request({ url: serviceName+"/brand/delete", method: "post",params:{"id":id}});
}
/**
 * 根据ID获取
 * @param {*} id 
 */
export function getBrand(id){
    return  request({ url: serviceName+"/brand/getById", method: "get",params:{"id":id}});
}
/**
 * 添加
 * @param {*} Brand
 */
export function insert(Brand) {
    return request({ url: serviceName+"/brand/insert", method: "post", data: Brand });
}
/**
 * 获取
 * @param {*}  Brand
 */
export function selectBrand(){
    return  request({ url: serviceName+"/brand/select", method: "get"});
}
/**
 * 上传logo
 */
export function setLogo(file){
    return request({
    url:serviceName+"/brand/setLogo",
    method:"post",
    data:file})
}